Imports Phoenix.Preferences.Store

''' <summary>
''' This class is used to get the NAP preferences root node (can be system or 
''' user root node for the registry or the file system). 
''' </summary>

Public MustInherit Class PreferencesFactory
    ''' <summary>
    ''' Use this method to get the user root node from the backing store. 
    ''' </summary>
    ''' <param name="factory">The backing store to use. </returns>
    Public Shared Function GetUserRootNode(ByVal factory As BackingStore) As IPreferencesNode
        Return factory.GetUserRootNodeFromStorage()
    End Function

    ''' <summary>
    ''' The only difference between this method and GetUserRootNode is the type of the
    ''' root node returned. 
    ''' </summary>
    ''' <param name="factory">The backing store to use. </param>
    ''' <returns>The system root node.</returns>
    Public Shared Function GetSystemRootNode(ByVal factory As BackingStore) As IPreferencesNode
        Return factory.GetSystemRootNodeFromStorage()
    End Function

End Class
